<script setup>
import {useRouter, useRoute} from 'vue-router'

const router = useRouter()
const route = useRoute()
console.log('route', route)
const IMAGEURL = 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg'
const goShopClick = () => {
  router.push(`/scenic/merchants/${route.query.commodityId}`)
}
</script>

<template>
<div class="business">
  <img class="image" :src="IMAGEURL" alt="">
  <div class="content">
    <div class="name">成都青城山景区票务服务中心</div>
    <div class="bottom">
      <div class="sales">在售商品 3000+</div>
      <div @click="goShopClick" class="link">进店 ></div>
    </div>
  </div>
  </div>
</template>

<style scoped lang="scss">
.business{
  display: flex;
  align-items: center;
  height: 10rem;
  background: #FFFFFC;
  border-radius: 1rem;
  opacity: 1;
  padding: 1rem;
  .image{
    height: 100%;
    //width: auto;
    //padding: 1rem;
  }
  .content{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding-left: 1rem;
    .name{
      font-size: 1.6rem;
      font-weight: bold;
      color: #333333;
    }
    .bottom{
      display: flex;
      justify-content: space-between;
      .sales{
        height: 1.7rem;
        background: rgba(0,0,0,0.06);
        border-radius: .3rem;
        opacity: 1;
        font-size: 1.2rem;
        font-weight: normal;
        color: #666666;
        line-height: 1.7rem;
        padding: 0 .3rem;
      }
      .link{
        font-size: 1.4rem;
        font-weight: normal;
        color: var(--van-primary-color);
      }
    }
  }
}
</style>